Other Classes
The following classes are available globally.
-
An object that notifies its delegate when the user’s location changes, minimizing the noise that normally accompanies location updates from a
CLLocationManagerobject.Unlike
Routerclasses such asRouteControllerandLegacyRouteController, this class operates without a predefined route, matching the user’s location to the road network at large. You can use a passive location manager to determine a starting point for a route that you calculate using theDirections.calculate(_:completionHandler:)method. If the user happens to be moving while you calculate the route, the passive location manager makes it less likely that the route will begin with a short segment on a side road or driveway and a confusing instruction to turn onto the current road.To find out when the user’s location changes, implement the
See morePassiveLocationDataSourceDelegateprotocol, or observeNotification.Name.passiveLocationDataSourceDidUpdatenotifications for more detailed information.Declaration
Swift
open class PassiveLocationDataSource : NSObjectextension PassiveLocationDataSource: CLLocationManagerDelegate -
See moreDispatchTimeris a general-purpose wrapper over theDispatchSourceTimermechanism in GCD.Declaration
Swift
public class DispatchTimer -
An object that notifies a map view when the user’s location changes, minimizing the noise that normally accompanies location updates from a
CLLocationManagerobject.Unlike
Routerclasses such asRouteControllerandLegacyRouteController, this class operates without a predefined route, matching the user’s location to the road network at large. If your application displays anMGLMapViewbefore starting turn-by-turn navigation, setMGLMapView.locationManagerto an instance of this class so that the map view always shows the location snapped to the road network. For example, use this class to show the user’s current location as they wander around town.This class depends on
See morePassiveLocationDataSourceto detect the user’s location as it changes. If you want location updates but do not need to display them on a map and do not want a dependency on the MapboxNavigation module, you can usePassiveLocationDataSourceinstead of this class.Declaration
Swift
open class PassiveLocationManager : NSObject, MGLLocationManagerextension PassiveLocationManager: PassiveLocationDataSourceDelegate
Install in Dash
Other Classes Reference